import request from './request.js'

const http = {
	get(url, data = {}) {
		return request.send({
			url: url,
			data: data
		})
	},
	gets(url = '', params) {
		return request.send({
			url: url + '?' + params
		})
	},
	post(url, data = {}) {
		return request.send({
			url: url,
			data: data,
			method: 'POST'
		})
	},
	posts(url = '', params) {
		return request.send({
			url: url + '?' + params,
			method: 'POST'
		})
	}
}
export default http